-
-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add all{components} functions #969
base: master
Are you sure you want to change the base?
feat: add all{components} functions #969
Conversation
allServerVariables(): ServerVariablesInterface; | ||
allParameters(): ChannelParametersInterface; | ||
allCorrelationIds(): CorrelationIdsInterface; | ||
allTags(): TagsInterface; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smoya I'm a little confused about where to add the allReplies
function. If I add it here, then v2 also needs to implement it. But v2 doesn't have replies. I see three possible approaches:
- Remove
allReplies
fromparser-api
since it can't be implemented for v2. - Add it here and return an empty array for the v2 implementation.
- Add
allReplies
to v3 only.
I would appreciate some insight on this.
|
||
import type { v3 } from '../../spec-types'; | ||
|
||
export class AsyncAPIDocument extends BaseModel<v3.AsyncAPIObject> implements AsyncAPIDocumentInterface { | ||
allSecuritySchemes(): SecuritySchemesInterface { | ||
return this.securitySchemes(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see two issues here:
- If
allSecuritySchemes
does the same assecuritySchemes
, then this is redundant. - I believe
securitySchemes
method implementation is wrong ATM because it is only returning Security Schemes fromcomponents
but instead would need to return from, for example, Operations in the root document.
cc @jonaslagoni please double 👀 just in case I'm delirious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- If
allSecuritySchemes
does the same assecuritySchemes
, then this is redundant.
I agree. it has only been added for the sake of completeness.
- I believe
securitySchemes
method implementation is wrong ATM because it is only returning Security Schemes fromcomponents
but instead would need to return from, for example, Operations in the root document.
the problem is that when I try to access the security scheme of an specific operation
or operationTrait
it returns SecurityRequirements[]
instead of SecuritySchemes
.
not sure if this is a bug or I am missing something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smoya pingy pongy.
Quality Gate passedIssues Measures |
Quality Gate passedIssues Measures |
This pull request has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this pull request, add a comment with detailed explanation. There can be many reasons why some specific pull request has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this pull request forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
Description